package com.lvmama.rhino.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lvmama.rhino.mapperDw.RegionProductManagerMapper;
import com.lvmama.rhino.pojo.RegionProductManager;
import com.lvmama.rhino.service.RegionProductManagerService;

/**
 * @Author:caoyong
 * @Description:
 * @Date：2018/5/16
 */
@Service("regionProductManagerService")
public class RegionProductManagerServiceImpl implements RegionProductManagerService {
    private Logger log = Logger.getLogger(RegionProductManagerServiceImpl.class);

    @Autowired
    private RegionProductManagerMapper regionProductManagerMapper;
    
	@Override
	public List<RegionProductManager> selectProductManagerList(String regionname) {
		log.info("selectProductManagerList start, query:" + regionname);
		try {
			return regionProductManagerMapper.selectProductManagerList(regionname);
		} catch (Exception e) {
			log.error("selectProductManagerList error:" + e.getMessage(), e);
		}
		return null;
	}
	
	@Override
	public List<RegionProductManager> selectRegionList() {
		log.info("selectRegionList start");
		try {
			return regionProductManagerMapper.selectRegionList();
		} catch (Exception e) {
			log.error("selectRegionList error:" + e.getMessage(), e);
		}
		return null;
	}
	
	@Override
	public List<RegionProductManager> selectSupperNameList() {
		try {
			return regionProductManagerMapper.selectSupperNameList();
		} catch (Exception e) {
			log.error("selectSupperNameList error:" + e.getMessage(), e);
		}
		return null;
	}

	@Override
	public List<RegionProductManager> selectSupperTypeList() {
		log.info("selectSupperTypeList start" );
		try {
			return regionProductManagerMapper.selectSupperTypeList();
		} catch (Exception e) {
			log.error("selectSupperTypeList error:" + e.getMessage(), e);
		}
		return null;
	}
}
